//
//  GetMoneyFieldCell.swift
//  XiaoJingMallSwift
//
//  Created by beisheng03 on 2017/9/7.
//  Copyright © 2017年 beisheng. All rights reserved.
//

import UIKit

class GetMoneyFieldCell: BaseTableViewCell {
    
    @IBOutlet weak var textField: UITextField!
    
    @IBOutlet weak var bottomLabel: UILabel!
    var model : BankCardInfoModel?{
        
        
        didSet{
            
            if model == nil{
                
                
                return
            }
            
            QL1(model!.available_predeposit)
            
            if let temp = model!.available_predeposit {
                
                bottomLabel.text = "可用余额\(temp)元"

            }
            
            
        }
    
    
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        contentView.backgroundColor = UIColor.white
        
        textField.delegate = self
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}



extension GetMoneyFieldCell : UITextFieldDelegate{
    
    func textFieldDidEndEditing(_ textField: UITextField) {
        
        
         model?.willPayMoney = textField.text!
            
        
        
    }
    
    
    
    
    
}
